package vista;
import java.awt.BorderLayout;
import javax.swing.JButton;


import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;


import controlador.ContActualizarCategoria;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class DlgActualizarCategorias extends javax.swing.JDialog {
	private JPanel pnlCategorias;
	private JTable tblCategorias;
	private JScrollPane jScrollPane1;
	private JButton btModificar;
	private JButton btSalir;
	private JButton btAnadir;
	
	private ContActualizarCategoria controlador;

	public DlgActualizarCategorias(JFrame frame, ContActualizarCategoria controlador) {
		super(frame);
		this.controlador = controlador;
		initGUI();
	}
	
	private void initGUI() {
		try {
			{
				this.setTitle("Categorias");
				{
					pnlCategorias = new JPanel();
					getContentPane().add(pnlCategorias, BorderLayout.CENTER);

					pnlCategorias.setPreferredSize(new java.awt.Dimension(386, 307));
					pnlCategorias.setLayout(null);
					{
						jScrollPane1 = new JScrollPane();
						pnlCategorias.add(jScrollPane1);
						jScrollPane1.setBounds(57, 39, 264, 145);
						{
							tblCategorias = new JTable();
							jScrollPane1.setViewportView(tblCategorias);
							tblCategorias.setBounds(90, 74, 193, 63);
						}
					}
					{
						btAnadir = new JButton();
						pnlCategorias.add(btAnadir);
						btAnadir.setText("Agregar");
						btAnadir.setBounds(33, 247, 97, 26);
					}
					{
						btModificar = new JButton();
						pnlCategorias.add(btModificar);
						btModificar.setText("Modificar");
						btModificar.setBounds(146, 247, 105, 26);
					}
					{
						btSalir = new JButton();
						pnlCategorias.add(btSalir);
						btSalir.setText("Salir");
						btSalir.setBounds(269, 247, 85, 26);
					}
				}
			}
			this.setSize(396, 322);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public JTable getTblCategorias() {
		return tblCategorias;
	}
	public void mostrarMensaje(String mensaje) {
		JOptionPane.showMessageDialog(this, mensaje);
	}
	
	
	public JButton getBtModificar() {
		return btModificar;
	}

	public JButton getBtSalir() {
		return btSalir;
	}

	public JButton getBtAnadir() {
		return btAnadir;
	}

}
